package com.example.testblog.web;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class IndexController {




    @GetMapping("/")

    public String index() {
    /*  int i = 9/0;*/
//        String blog = null;
//        if (blog == null) {
//            throw  new NotFoundException("博客不存在");
//        }
        System.out.println("");
        System.out.println("这里测试收到请求了");
        return "index2";
    }


    @RequestMapping( value = "/test")
    public String index2() {
        return "index2";
    }
}
